#include "sDiscovery.h"

#include <sstream>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/NodeIterator.h>
#include "misc/Interface.h"
#include "misc/Debug.h"
#include "server/net/sAnnounce.h"
#include "server/net/NetworkControl.h"
/*********************************************************/
void sDiscovery::execute()
{
	// The server only sends discovery messages so we don't do anything here
}
/*********************************************************/
std::string sDiscovery::serialize() const
{
	NetworkControl& ns = NetworkControl::Instance();
	std::ostringstream		ostr;

	ostr << "<GS id='" << ns.getID() << "'>";
	ostr << "<Discovery></Discovery>";
	ostr << "</GS>";

	return( ostr.str() );
}
/*********************************************************/
void sDiscovery::deserialize(Poco::XML::NodeIterator& it)
{
	// This messages doesn't carry any specific data so we do nothing here
}
/*********************************************************/
